#答案选项

import random

file_axx = open("unit_1_axx_part01.txt", 'w', encoding="utf-8")
file_bxx = open("unit_1_bxx_part01.txt", 'w', encoding="utf-8")
file_cxx = open("unit_1_cxx_part01.txt", 'w', encoding="utf-8")
file_dxx = open("unit_1_dxx_part01.txt", 'w', encoding="utf-8")

list_part_1 = ["survey", "surveys","surveyed","surveying","surveyor", "field survey", "survey data"]
list_part_2 = ["add up", "add to", "adds up", "adds to"]
list_part_3 = ["upset", "upsetting", "get upset"]
list_part_4 = ["ignore", "ignoring", "ignores", "ignored", "ignorantly", "ignorance"]
list_part_5 = ["calm", "keep calm", "calmly", "calmness"]
list_part_6 = ["calm down", "calm up", "calm upon"]
list_part_7 = ["have got to", "have to"]

list_answer = [list_part_1,list_part_2,list_part_3,list_part_4,list_part_5,list_part_6,list_part_7]

i = 0

while(i <218):
    
    test01 = random.randint(0, 6)
    test02 = random.randint(0, 6)
    test03 = random.randint(0, 6)
    test04 = random.randint(0, 6)

    if test01 != test02 != test03 != test04:
        i += 1
        i_1 = random.randint(0, len(list_answer[test01])-1)
        i_2 = random.randint(0, len(list_answer[test02])-1)
        i_3 = random.randint(0, len(list_answer[test03])-1)
        i_4 = random.randint(0, len(list_answer[test04])-1)
        
        file_axx.write("\""+list_answer[test01][i_1]+"\",")
        file_bxx.write("\""+list_answer[test02][i_2]+"\",")
        file_cxx.write("\""+list_answer[test03][i_3]+"\",")
        file_dxx.write("\""+list_answer[test04][i_4]+"\",")
        
file_axx.close()
file_bxx.close()
file_cxx.close()
file_dxx.close()

